/**
 * author:Administrator
 * date:2016/2/23
 * desc:TODO
 */
'use strict';

let RepoImpl = require('../../../infrastructure/persist').TicketRepoImpl;

class Ticket {

  static * find(id) {
    return yield RepoImpl.find(id);
  }

  /**
   * @param ticket
   * @param t transaction
   */
  static * store(ticket, t) {
    yield RepoImpl.store(ticket, t);
  }

  static * findByCode(code) {
    return yield RepoImpl.findByCode(code);
  }
}

module.exports = Ticket;